@import 'variables';
@import "mixins/max-height";

$dropHover: 0.08;

.dropdown-item {
  &:active {
    outline: none;
    background-color: $gray-300;
    color: $gray-800;
  }
}

.dropdown {
  display: flex;
  align-items: center;

  &.hover-light {
    .button-icon {
      &.hover-area {
        &:active,
        &:focus,
        &:hover {
          background-color: rgba($white, 0.12);
          outline: none;
        }
      }
    }
  }

  &.button-icon {
    margin-left: 0;
  }

  .dropdown-menu {
    border-radius: $space-x1;
    display: flex;
    flex-direction: column;
    box-shadow: $dropshadow-16;
    background-color: white;
    z-index: 1100;

    @include dropdown-max-height;
  }

  .dropdown-item {
    font-size: 1rem;
    font-weight: normal;
    line-height: 1.5rem;
    letter-spacing: 0.15px;
    color: $gray-900;

    display: flex;
    justify-content: flex-start;
    align-items: center;

    min-width: 13rem;
    border-width: 0;
    background-color: white;
    cursor: pointer;

    &.border-bottom {
      border-bottom: 1px solid $gray-200;
    }

    &.sm {
      padding: $space-x2 $space-x4;
    }

    &.xl {
      padding: $space-x2 $space-x4;
    }

    > svg {
      margin-right: $space-x2;
    }

    &:hover,
    &:focus {
      background-color: $gray-100;
      outline: none;

      &.disabled {
        background-color: white;
        outline: none;
      }
    }

    &:active {
      background-color: $gray-200;
    }

    &.active {
      background-color: $gray-200;
    }

    &.disabled {
      opacity: 0.3;
      cursor: default;
    }
  }
}
